package com.ruoyi.collect.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 采集站点对象 collect_site
 *
 * @author ruoyi
 * @date 2025-11-07
 */
public class CollectSite extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 站点ID */
    private Long siteId;

    /** 站点名称 */
    @Excel(name = "站点名称")
    private String siteName;

    /** 采集地址(兼容MacCMS格式) */
    @Excel(name = "采集地址")
    private String siteUrl;

    /** 采集标识(对应MacCMS的cjflag) */
    @Excel(name = "采集标识")
    private String siteFlag;

    /** API类型(maccms/custom) */
    @Excel(name = "API类型")
    private String apiType;

    /** API版本 */
    private String apiVersion;

    /** API配置 */
    private String apiConfig;

    /** 字符编码 */
    private String charset;

    /** 采集类型 */
    private String collectType;

    /** 资源类型(1=视频vod 2=文章art 8=演员actor) */
    @Excel(name = "资源类型", readConverterExp = "1=视频,2=文章,8=演员")
    private String resourceType;

    /** 数据格式(0=自动 1=XML 2=JSON) */
    @Excel(name = "数据格式", readConverterExp = "0=自动,1=XML,2=JSON")
    private String dataFormat;

    /** 采集参数(base64编码) */
    private String collectParam;

    /** 更新规则(,a追加 ,b覆盖 ,c合并 ,d跳过) */
    @Excel(name = "更新规则")
    private String uprule;

    /** 过滤器(0=不过滤 1=指定播放器 2=排除播放器) */
    private String filter;

    /** 过滤播放器列表(逗号分隔) */
    private String filterFrom;

    /** 随机点击数开始值 */
    private Integer hitsStart;

    /** 随机点击数结束值 */
    private Integer hitsEnd;

    /** 随机评分(0=否 1=是) */
    private String score;

    /** 图片处理(0=不处理 1=同步到本地 2=使用代理) */
    private String picMode;

    /** 起始页码 */
    private Integer pagebase;

    /** 每页数量 */
    private Integer pagesize;

    /** 最大采集页数 */
    private Integer maxCollectPages;

    /** 采集间隔(秒) */
    private Integer collectInterval;

    /** 自动采集(0=否 1=是) */
    private String autoCollect;

    /** 采集小时数 */
    private Integer collectHours;

    /** 状态（0正常 1停用） */
    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
    private String status;

    /** 最后采集时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "最后采集时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date lastCollectTime;

    /** 最后采集页码 */
    private Integer lastCollectPage;

    /** 总采集次数 */
    @Excel(name = "采集次数")
    private Long collectCount;

    /** 成功采集数 */
    @Excel(name = "成功数")
    private Long successCount;

    /** 失败采集数 */
    @Excel(name = "失败数")
    private Long failCount;

    public void setSiteId(Long siteId)
    {
        this.siteId = siteId;
    }

    public Long getSiteId()
    {
        return siteId;
    }

    public void setSiteName(String siteName)
    {
        this.siteName = siteName;
    }

    public String getSiteName()
    {
        return siteName;
    }

    public void setSiteUrl(String siteUrl)
    {
        this.siteUrl = siteUrl;
    }

    public String getSiteUrl()
    {
        return siteUrl;
    }

    public void setSiteFlag(String siteFlag)
    {
        this.siteFlag = siteFlag;
    }

    public String getSiteFlag()
    {
        return siteFlag;
    }

    public void setApiType(String apiType)
    {
        this.apiType = apiType;
    }

    public String getApiType()
    {
        return apiType;
    }

    public void setApiVersion(String apiVersion)
    {
        this.apiVersion = apiVersion;
    }

    public String getApiVersion()
    {
        return apiVersion;
    }

    public void setApiConfig(String apiConfig)
    {
        this.apiConfig = apiConfig;
    }

    public String getApiConfig()
    {
        return apiConfig;
    }

    public void setCharset(String charset)
    {
        this.charset = charset;
    }

    public String getCharset()
    {
        return charset;
    }

    public void setCollectType(String collectType)
    {
        this.collectType = collectType;
    }

    public String getCollectType()
    {
        return collectType;
    }

    public void setResourceType(String resourceType)
    {
        this.resourceType = resourceType;
    }

    public String getResourceType()
    {
        return resourceType;
    }

    public void setDataFormat(String dataFormat)
    {
        this.dataFormat = dataFormat;
    }

    public String getDataFormat()
    {
        return dataFormat;
    }

    public void setCollectParam(String collectParam)
    {
        this.collectParam = collectParam;
    }

    public String getCollectParam()
    {
        return collectParam;
    }

    public void setUprule(String uprule)
    {
        this.uprule = uprule;
    }

    public String getUprule()
    {
        return uprule;
    }

    public void setFilter(String filter)
    {
        this.filter = filter;
    }

    public String getFilter()
    {
        return filter;
    }

    public void setFilterFrom(String filterFrom)
    {
        this.filterFrom = filterFrom;
    }

    public String getFilterFrom()
    {
        return filterFrom;
    }

    public void setHitsStart(Integer hitsStart)
    {
        this.hitsStart = hitsStart;
    }

    public Integer getHitsStart()
    {
        return hitsStart;
    }

    public void setHitsEnd(Integer hitsEnd)
    {
        this.hitsEnd = hitsEnd;
    }

    public Integer getHitsEnd()
    {
        return hitsEnd;
    }

    public void setScore(String score)
    {
        this.score = score;
    }

    public String getScore()
    {
        return score;
    }

    public void setPicMode(String picMode)
    {
        this.picMode = picMode;
    }

    public String getPicMode()
    {
        return picMode;
    }

    public void setPagebase(Integer pagebase)
    {
        this.pagebase = pagebase;
    }

    public Integer getPagebase()
    {
        return pagebase;
    }

    public void setPagesize(Integer pagesize)
    {
        this.pagesize = pagesize;
    }

    public Integer getPagesize()
    {
        return pagesize;
    }

    public void setMaxCollectPages(Integer maxCollectPages)
    {
        this.maxCollectPages = maxCollectPages;
    }

    public Integer getMaxCollectPages()
    {
        return maxCollectPages;
    }

    public void setCollectInterval(Integer collectInterval)
    {
        this.collectInterval = collectInterval;
    }

    public Integer getCollectInterval()
    {
        return collectInterval;
    }

    public void setAutoCollect(String autoCollect)
    {
        this.autoCollect = autoCollect;
    }

    public String getAutoCollect()
    {
        return autoCollect;
    }

    public void setCollectHours(Integer collectHours)
    {
        this.collectHours = collectHours;
    }

    public Integer getCollectHours()
    {
        return collectHours;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }

    public void setLastCollectTime(Date lastCollectTime)
    {
        this.lastCollectTime = lastCollectTime;
    }

    public Date getLastCollectTime()
    {
        return lastCollectTime;
    }

    public void setLastCollectPage(Integer lastCollectPage)
    {
        this.lastCollectPage = lastCollectPage;
    }

    public Integer getLastCollectPage()
    {
        return lastCollectPage;
    }

    public void setCollectCount(Long collectCount)
    {
        this.collectCount = collectCount;
    }

    public Long getCollectCount()
    {
        return collectCount;
    }

    public void setSuccessCount(Long successCount)
    {
        this.successCount = successCount;
    }

    public Long getSuccessCount()
    {
        return successCount;
    }

    public void setFailCount(Long failCount)
    {
        this.failCount = failCount;
    }

    public Long getFailCount()
    {
        return failCount;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("siteId", getSiteId())
            .append("siteName", getSiteName())
            .append("siteUrl", getSiteUrl())
            .append("siteFlag", getSiteFlag())
            .append("apiType", getApiType())
            .append("resourceType", getResourceType())
            .append("dataFormat", getDataFormat())
            .append("collectParam", getCollectParam())
            .append("uprule", getUprule())
            .append("filter", getFilter())
            .append("filterFrom", getFilterFrom())
            .append("hitsStart", getHitsStart())
            .append("hitsEnd", getHitsEnd())
            .append("score", getScore())
            .append("picMode", getPicMode())
            .append("status", getStatus())
            .append("lastCollectTime", getLastCollectTime())
            .append("lastCollectPage", getLastCollectPage())
            .append("collectCount", getCollectCount())
            .append("successCount", getSuccessCount())
            .append("failCount", getFailCount())
            .append("remark", getRemark())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}